{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\"],\n  _excluded2 = [\"fixed\"];\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport toArray from \"rc-util/es/Children/toArray\";\nimport { INTERNAL_COL_DEFINE } from \"../utils/legacyUtil\";\nimport { EXPAND_COLUMN } from \"../constant\";\nexport function convertChildrenToColumns(children) {\n  return toArray(children).filter(function (node) {\n    return /*#__PURE__*/React.isValidElement(node);\n  }).map(function (_ref) {\n    var key = _ref.key,\n      props = _ref.props;\n    var nodeChildren = props.children,\n      restProps = _objectWithoutProperties(props, _excluded);\n    var column = _objectSpread({\n      key: key\n    }, restProps);\n    if (nodeChildren) {\n      column.children = convertChildrenToColumns(nodeChildren);\n    }\n    return column;\n  });\n}\nfunction flatColumns(columns) {\n  return columns.reduce(function (list, column) {\n    var fixed = column.fixed; // Convert `fixed='true'` to `fixed='left'` instead\n\n    var parsedFixed = fixed === true ? 'left' : fixed;\n    var subColumns = column.children;\n    if (subColumns && subColumns.length > 0) {\n      return [].concat(_toConsumableArray(list), _toConsumableArray(flatColumns(subColumns).map(function (subColum) {\n        return _objectSpread({\n          fixed: parsedFixed\n        }, subColum);\n      })));\n    }\n    return [].concat(_toConsumableArray(list), [_objectSpread(_objectSpread({}, column), {}, {\n      fixed: parsedFixed\n    })]);\n  }, []);\n}\nfunction warningFixed(flattenColumns) {\n  var allFixLeft = true;\n  for (var i = 0; i < flattenColumns.length; i += 1) {\n    var col = flattenColumns[i];\n    if (allFixLeft && col.fixed !== 'left') {\n      allFixLeft = false;\n    } else if (!allFixLeft && col.fixed === 'left') {\n      warning(false, \"Index \".concat(i - 1, \" of `columns` missing `fixed='left'` prop.\"));\n      break;\n    }\n  }\n  var allFixRight = true;\n  for (var _i = flattenColumns.length - 1; _i >= 0; _i -= 1) {\n    var _col = flattenColumns[_i];\n    if (allFixRight && _col.fixed !== 'right') {\n      allFixRight = false;\n    } else if (!allFixRight && _col.fixed === 'right') {\n      warning(false, \"Index \".concat(_i + 1, \" of `columns` missing `fixed='right'` prop.\"));\n      break;\n    }\n  }\n}\nfunction revertForRtl(columns) {\n  return columns.map(function (column) {\n    var fixed = column.fixed,\n      restProps = _objectWithoutProperties(column, _excluded2); // Convert `fixed='left'` to `fixed='right'` instead\n\n    var parsedFixed = fixed;\n    if (fixed === 'left') {\n      parsedFixed = 'right';\n    } else if (fixed === 'right') {\n      parsedFixed = 'left';\n    }\n    return _objectSpread({\n      fixed: parsedFixed\n    }, restProps);\n  });\n}\n/**\n * Parse `columns` & `children` into `columns`.\n */\n\nfunction useColumns(_ref2, transformColumns) {\n  var prefixCls = _ref2.prefixCls,\n    columns = _ref2.columns,\n    children = _ref2.children,\n    expandable = _ref2.expandable,\n    expandedKeys = _ref2.expandedKeys,\n    columnTitle = _ref2.columnTitle,\n    getRowKey = _ref2.getRowKey,\n    onTriggerExpand = _ref2.onTriggerExpand,\n    expandIcon = _ref2.expandIcon,\n    rowExpandable = _ref2.rowExpandable,\n    expandIconColumnIndex = _ref2.expandIconColumnIndex,\n    direction = _ref2.direction,\n    expandRowByClick = _ref2.expandRowByClick,\n    columnWidth = _ref2.columnWidth,\n    fixed = _ref2.fixed;\n  var baseColumns = React.useMemo(function () {\n    return columns || convertChildrenToColumns(children);\n  }, [columns, children]); // ========================== Expand ==========================\n\n  var withExpandColumns = React.useMemo(function () {\n    if (expandable) {\n      var _expandColumn;\n      var cloneColumns = baseColumns.slice(); // >>> Warning if use `expandIconColumnIndex`\n\n      if (process.env.NODE_ENV !== 'production' && expandIconColumnIndex >= 0) {\n        warning(false, '`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead.');\n      } // >>> Insert expand column if not exist\n\n      if (!cloneColumns.includes(EXPAND_COLUMN)) {\n        var expandColIndex = expandIconColumnIndex || 0;\n        if (expandColIndex >= 0) {\n          cloneColumns.splice(expandColIndex, 0, EXPAND_COLUMN);\n        }\n      } // >>> Deduplicate additional expand column\n\n      if (process.env.NODE_ENV !== 'production' && cloneColumns.filter(function (c) {\n        return c === EXPAND_COLUMN;\n      }).length > 1) {\n        warning(false, 'There exist more than one `EXPAND_COLUMN` in `columns`.');\n      }\n      var expandColumnIndex = cloneColumns.indexOf(EXPAND_COLUMN);\n      cloneColumns = cloneColumns.filter(function (column, index) {\n        return column !== EXPAND_COLUMN || index === expandColumnIndex;\n      }); // >>> Check if expand column need to fixed\n\n      var prevColumn = baseColumns[expandColumnIndex];\n      var fixedColumn;\n      if ((fixed === 'left' || fixed) && !expandIconColumnIndex) {\n        fixedColumn = 'left';\n      } else if ((fixed === 'right' || fixed) && expandIconColumnIndex === baseColumns.length) {\n        fixedColumn = 'right';\n      } else {\n        fixedColumn = prevColumn ? prevColumn.fixed : null;\n      } // >>> Create expandable column\n\n      var expandColumn = (_expandColumn = {}, _defineProperty(_expandColumn, INTERNAL_COL_DEFINE, {\n        className: \"\".concat(prefixCls, \"-expand-icon-col\"),\n        columnType: 'EXPAND_COLUMN'\n      }), _defineProperty(_expandColumn, \"title\", columnTitle), _defineProperty(_expandColumn, \"fixed\", fixedColumn), _defineProperty(_expandColumn, \"className\", \"\".concat(prefixCls, \"-row-expand-icon-cell\")), _defineProperty(_expandColumn, \"width\", columnWidth), _defineProperty(_expandColumn, \"render\", function render(_, record, index) {\n        var rowKey = getRowKey(record, index);\n        var expanded = expandedKeys.has(rowKey);\n        var recordExpandable = rowExpandable ? rowExpandable(record) : true;\n        var icon = expandIcon({\n          prefixCls: prefixCls,\n          expanded: expanded,\n          expandable: recordExpandable,\n          record: record,\n          onExpand: onTriggerExpand\n        });\n        if (expandRowByClick) {\n          return /*#__PURE__*/React.createElement(\"span\", {\n            onClick: function onClick(e) {\n              return e.stopPropagation();\n            }\n          }, icon);\n        }\n        return icon;\n      }), _expandColumn);\n      return cloneColumns.map(function (col) {\n        return col === EXPAND_COLUMN ? expandColumn : col;\n      });\n    }\n    if (process.env.NODE_ENV !== 'production' && baseColumns.includes(EXPAND_COLUMN)) {\n      warning(false, '`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`.');\n    }\n    return baseColumns.filter(function (col) {\n      return col !== EXPAND_COLUMN;\n    });\n  }, [expandable, baseColumns, getRowKey, expandedKeys, expandIcon, direction]); // ========================= Transform ========================\n\n  var mergedColumns = React.useMemo(function () {\n    var finalColumns = withExpandColumns;\n    if (transformColumns) {\n      finalColumns = transformColumns(finalColumns);\n    } // Always provides at least one column for table display\n\n    if (!finalColumns.length) {\n      finalColumns = [{\n        render: function render() {\n          return null;\n        }\n      }];\n    }\n    return finalColumns;\n  }, [transformColumns, withExpandColumns, direction]); // ========================== Flatten =========================\n\n  var flattenColumns = React.useMemo(function () {\n    if (direction === 'rtl') {\n      return revertForRtl(flatColumns(mergedColumns));\n    }\n    return flatColumns(mergedColumns);\n  }, [mergedColumns, direction]); // Only check out of production since it's waste for each render\n\n  if (process.env.NODE_ENV !== 'production') {\n    warningFixed(direction === 'rtl' ? flattenColumns.slice().reverse() : flattenColumns);\n  }\n  return [mergedColumns, flattenColumns];\n}\nexport default useColumns;","map":{"version":3,"names":["_defineProperty","_toConsumableArray","_objectSpread","_objectWithoutProperties","_excluded","_excluded2","React","warning","toArray","INTERNAL_COL_DEFINE","EXPAND_COLUMN","convertChildrenToColumns","children","filter","node","isValidElement","map","_ref","key","props","nodeChildren","restProps","column","flatColumns","columns","reduce","list","fixed","parsedFixed","subColumns","length","concat","subColum","warningFixed","flattenColumns","allFixLeft","i","col","allFixRight","_i","_col","revertForRtl","useColumns","_ref2","transformColumns","prefixCls","expandable","expandedKeys","columnTitle","getRowKey","onTriggerExpand","expandIcon","rowExpandable","expandIconColumnIndex","direction","expandRowByClick","columnWidth","baseColumns","useMemo","withExpandColumns","_expandColumn","cloneColumns","slice","process","env","NODE_ENV","includes","expandColIndex","splice","c","expandColumnIndex","indexOf","index","prevColumn","fixedColumn","expandColumn","className","columnType","render","_","record","rowKey","expanded","has","recordExpandable","icon","onExpand","createElement","onClick","e","stopPropagation","mergedColumns","finalColumns","reverse"],"sources":["/data/messenger.client/node_modules/rc-table/es/hooks/useColumns.js"],"sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\"],\n    _excluded2 = [\"fixed\"];\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport toArray from \"rc-util/es/Children/toArray\";\nimport { INTERNAL_COL_DEFINE } from \"../utils/legacyUtil\";\nimport { EXPAND_COLUMN } from \"../constant\";\nexport function convertChildrenToColumns(children) {\n  return toArray(children).filter(function (node) {\n    return /*#__PURE__*/React.isValidElement(node);\n  }).map(function (_ref) {\n    var key = _ref.key,\n        props = _ref.props;\n\n    var nodeChildren = props.children,\n        restProps = _objectWithoutProperties(props, _excluded);\n\n    var column = _objectSpread({\n      key: key\n    }, restProps);\n\n    if (nodeChildren) {\n      column.children = convertChildrenToColumns(nodeChildren);\n    }\n\n    return column;\n  });\n}\n\nfunction flatColumns(columns) {\n  return columns.reduce(function (list, column) {\n    var fixed = column.fixed; // Convert `fixed='true'` to `fixed='left'` instead\n\n    var parsedFixed = fixed === true ? 'left' : fixed;\n    var subColumns = column.children;\n\n    if (subColumns && subColumns.length > 0) {\n      return [].concat(_toConsumableArray(list), _toConsumableArray(flatColumns(subColumns).map(function (subColum) {\n        return _objectSpread({\n          fixed: parsedFixed\n        }, subColum);\n      })));\n    }\n\n    return [].concat(_toConsumableArray(list), [_objectSpread(_objectSpread({}, column), {}, {\n      fixed: parsedFixed\n    })]);\n  }, []);\n}\n\nfunction warningFixed(flattenColumns) {\n  var allFixLeft = true;\n\n  for (var i = 0; i < flattenColumns.length; i += 1) {\n    var col = flattenColumns[i];\n\n    if (allFixLeft && col.fixed !== 'left') {\n      allFixLeft = false;\n    } else if (!allFixLeft && col.fixed === 'left') {\n      warning(false, \"Index \".concat(i - 1, \" of `columns` missing `fixed='left'` prop.\"));\n      break;\n    }\n  }\n\n  var allFixRight = true;\n\n  for (var _i = flattenColumns.length - 1; _i >= 0; _i -= 1) {\n    var _col = flattenColumns[_i];\n\n    if (allFixRight && _col.fixed !== 'right') {\n      allFixRight = false;\n    } else if (!allFixRight && _col.fixed === 'right') {\n      warning(false, \"Index \".concat(_i + 1, \" of `columns` missing `fixed='right'` prop.\"));\n      break;\n    }\n  }\n}\n\nfunction revertForRtl(columns) {\n  return columns.map(function (column) {\n    var fixed = column.fixed,\n        restProps = _objectWithoutProperties(column, _excluded2); // Convert `fixed='left'` to `fixed='right'` instead\n\n\n    var parsedFixed = fixed;\n\n    if (fixed === 'left') {\n      parsedFixed = 'right';\n    } else if (fixed === 'right') {\n      parsedFixed = 'left';\n    }\n\n    return _objectSpread({\n      fixed: parsedFixed\n    }, restProps);\n  });\n}\n/**\n * Parse `columns` & `children` into `columns`.\n */\n\n\nfunction useColumns(_ref2, transformColumns) {\n  var prefixCls = _ref2.prefixCls,\n      columns = _ref2.columns,\n      children = _ref2.children,\n      expandable = _ref2.expandable,\n      expandedKeys = _ref2.expandedKeys,\n      columnTitle = _ref2.columnTitle,\n      getRowKey = _ref2.getRowKey,\n      onTriggerExpand = _ref2.onTriggerExpand,\n      expandIcon = _ref2.expandIcon,\n      rowExpandable = _ref2.rowExpandable,\n      expandIconColumnIndex = _ref2.expandIconColumnIndex,\n      direction = _ref2.direction,\n      expandRowByClick = _ref2.expandRowByClick,\n      columnWidth = _ref2.columnWidth,\n      fixed = _ref2.fixed;\n  var baseColumns = React.useMemo(function () {\n    return columns || convertChildrenToColumns(children);\n  }, [columns, children]); // ========================== Expand ==========================\n\n  var withExpandColumns = React.useMemo(function () {\n    if (expandable) {\n      var _expandColumn;\n\n      var cloneColumns = baseColumns.slice(); // >>> Warning if use `expandIconColumnIndex`\n\n      if (process.env.NODE_ENV !== 'production' && expandIconColumnIndex >= 0) {\n        warning(false, '`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead.');\n      } // >>> Insert expand column if not exist\n\n\n      if (!cloneColumns.includes(EXPAND_COLUMN)) {\n        var expandColIndex = expandIconColumnIndex || 0;\n\n        if (expandColIndex >= 0) {\n          cloneColumns.splice(expandColIndex, 0, EXPAND_COLUMN);\n        }\n      } // >>> Deduplicate additional expand column\n\n\n      if (process.env.NODE_ENV !== 'production' && cloneColumns.filter(function (c) {\n        return c === EXPAND_COLUMN;\n      }).length > 1) {\n        warning(false, 'There exist more than one `EXPAND_COLUMN` in `columns`.');\n      }\n\n      var expandColumnIndex = cloneColumns.indexOf(EXPAND_COLUMN);\n      cloneColumns = cloneColumns.filter(function (column, index) {\n        return column !== EXPAND_COLUMN || index === expandColumnIndex;\n      }); // >>> Check if expand column need to fixed\n\n      var prevColumn = baseColumns[expandColumnIndex];\n      var fixedColumn;\n\n      if ((fixed === 'left' || fixed) && !expandIconColumnIndex) {\n        fixedColumn = 'left';\n      } else if ((fixed === 'right' || fixed) && expandIconColumnIndex === baseColumns.length) {\n        fixedColumn = 'right';\n      } else {\n        fixedColumn = prevColumn ? prevColumn.fixed : null;\n      } // >>> Create expandable column\n\n\n      var expandColumn = (_expandColumn = {}, _defineProperty(_expandColumn, INTERNAL_COL_DEFINE, {\n        className: \"\".concat(prefixCls, \"-expand-icon-col\"),\n        columnType: 'EXPAND_COLUMN'\n      }), _defineProperty(_expandColumn, \"title\", columnTitle), _defineProperty(_expandColumn, \"fixed\", fixedColumn), _defineProperty(_expandColumn, \"className\", \"\".concat(prefixCls, \"-row-expand-icon-cell\")), _defineProperty(_expandColumn, \"width\", columnWidth), _defineProperty(_expandColumn, \"render\", function render(_, record, index) {\n        var rowKey = getRowKey(record, index);\n        var expanded = expandedKeys.has(rowKey);\n        var recordExpandable = rowExpandable ? rowExpandable(record) : true;\n        var icon = expandIcon({\n          prefixCls: prefixCls,\n          expanded: expanded,\n          expandable: recordExpandable,\n          record: record,\n          onExpand: onTriggerExpand\n        });\n\n        if (expandRowByClick) {\n          return /*#__PURE__*/React.createElement(\"span\", {\n            onClick: function onClick(e) {\n              return e.stopPropagation();\n            }\n          }, icon);\n        }\n\n        return icon;\n      }), _expandColumn);\n      return cloneColumns.map(function (col) {\n        return col === EXPAND_COLUMN ? expandColumn : col;\n      });\n    }\n\n    if (process.env.NODE_ENV !== 'production' && baseColumns.includes(EXPAND_COLUMN)) {\n      warning(false, '`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`.');\n    }\n\n    return baseColumns.filter(function (col) {\n      return col !== EXPAND_COLUMN;\n    });\n  }, [expandable, baseColumns, getRowKey, expandedKeys, expandIcon, direction]); // ========================= Transform ========================\n\n  var mergedColumns = React.useMemo(function () {\n    var finalColumns = withExpandColumns;\n\n    if (transformColumns) {\n      finalColumns = transformColumns(finalColumns);\n    } // Always provides at least one column for table display\n\n\n    if (!finalColumns.length) {\n      finalColumns = [{\n        render: function render() {\n          return null;\n        }\n      }];\n    }\n\n    return finalColumns;\n  }, [transformColumns, withExpandColumns, direction]); // ========================== Flatten =========================\n\n  var flattenColumns = React.useMemo(function () {\n    if (direction === 'rtl') {\n      return revertForRtl(flatColumns(mergedColumns));\n    }\n\n    return flatColumns(mergedColumns);\n  }, [mergedColumns, direction]); // Only check out of production since it's waste for each render\n\n  if (process.env.NODE_ENV !== 'production') {\n    warningFixed(direction === 'rtl' ? flattenColumns.slice().reverse() : flattenColumns);\n  }\n\n  return [mergedColumns, flattenColumns];\n}\n\nexport default useColumns;"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,aAAa,MAAM,0CAA0C;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